import org.apache.commons.lang.time.DateUtils;

class Notas {

    Date data
    static belongsTo = [usuario:User]
    float nota
    static constraints = {
        nota(range:0..10)
    }
    void setData(Date value) {
        data = DateUtils.truncate(value, Calendar.DATE)
        println data
    }
}
